package com.homework;

public class Vehicle {
    public String brand;
    public String color;
    public double speed=0;
    void setVehicle(String brand,String color) {
        this.brand=brand;
        this.color=color;
    }
    void access(String brand,String color,double speed) {
        this.brand=brand;
        this.color=color;
        this.speed=speed;
    }
    void run() {
        System.out.println("该汽车的品牌为："+this.brand+"颜色为:"+this.color+"速度为"+this.speed);
    }
}
class VehicleTest {
    public static void main(String args[]) {
        Vehicle c;
        c=new Vehicle();
        c.setVehicle("benz", "yellow");
        c.run();
        c.access("benz", "black", 300);
        c.run();
    }
}
